import pyecharts.options as opts
from pyecharts.charts import Bar


def plot_data_with_plotly(data):
    columns = data.columns
    bar = Bar()
    for col in columns:
        bar.add_xaxis(data.index.tolist())
        bar.add_yaxis(col, data[col].tolist())
    bar.set_global_opts(title_opts=opts.TitleOpts(title="柱状图"), toolbox_opts=opts.ToolboxOpts(is_show=True), label_opts=opts.LabelOpts(is_show=False))
    bar.render("bar_chart.html")
    return bar